#include "trace_custom_tiling.h"
#include <cstring>

void GenerateTilingData(uint8_t *buf, uint32_t matrixNum)
{
    TraceCustomTilingData t{};
    t.matrixNum    = matrixNum;
    t.rowLength    = 777;
    t.columnLength = 777;
    t.typeSize     = sizeof(uint16_t);
    t.alignNum     = 32 / t.typeSize;                    // 16
    t.alignPadding = (t.rowLength % t.alignNum) ? (t.alignNum - (t.rowLength % t.alignNum)) : 0;
    t.alignLength  = t.rowLength + t.alignPadding;       // 792
    // 单块处理一个矩阵：取消分段
    t.fullTileLength = 0;
    t.lastTileLength = t.rowLength;                      // 777
    t.ubMax       = 0;
    t.matrixOrder = 0;
    t.loopCnt     = 1;
    std::memcpy(buf, &t, sizeof(t));
}